Two zones
The previous sections demonstrated how to run a simulation and generate a model, focusing on a simple one-zone free-float building. This tutorial will guide you through simulating a two-zone building. A similar modeling approach can be applied to more complex multi-zone buildings.
Input configuration file
The described building configuration indicates a structure with two distinct spaces: a smaller room (SPACE:001) and a larger room (SPACE:002). Both spaces utilize walls constructed with a combination of three different materials that have moderate thermal properties. The building features external walls and floors that are also constructed from the same materials, indicating a cohesive thermal envelope.
Windows in both spaces are specified with a dual-glazing system that includes a layer of gas (air) between two glass panes, enhancing insulation. The building has specific dimensions, with SPACE:001 having a floor area of 80 square meters and SPACE:002 a larger area of 120 square meters, suggesting it is designed for residential or light commercial use.
Overall, the building appears to be energy-efficient, leveraging materials that provide decent thermal resistance and effective glazing to minimize heat loss while allowing natural light. The layout and materials suggest a practical design optimized for comfort and energy performance.
material:
- id: MATERIAL:001
thermal_conductivity: 0.045
density: 2100.0
specific_heat_capacity: 900.0
- id: MATERIAL:002
thermal_conductivity: 0.04
density: 1950.0
specific_heat_capacity: 950.0
- id: MATERIAL:003
thermal_conductivity: 0.038
density: 2050.0
specific_heat_capacity: 920.0
constructions:
- id: CONSTRUCTION:001
layers:
- material: MATERIAL:001
thickness: 0.12
- material: MATERIAL:002
thickness: 0.08
- material: MATERIAL:003
thickness: 0.1
glass_material:
- density: 2500.0
id: GLASS:001
longwave_emissivity: 0.82
shortwave_emissivity: 0.65
specific_heat_capacity: 860.0
thermal_conductivity: 1.1
gas:
- density: 1.18
id: AIR:001
longwave_emissivity: 0.0
shortwave_emissivity: 0.0
specific_heat_capacity: 1005.0
thermal_conductivity: 0.026
glazings:
- id: INS2AR2020:001
layers:
- glass: GLASS:001
thickness: 0.005
- gas: AIR:001
thickness: 0.014
- glass: GLASS:001
thickness: 0.005
spaces:
- parameters:
floor_area: 80.0 # Smaller room
average_room_height: 2.5
id: SPACE:001
external_boundaries:
external_walls:
- surface: 90.0
azimuth: 180.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 70.0
azimuth: 90.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 160.0
azimuth: 270.0
tilt: wall
construction: CONSTRUCTION:001
floor_on_grounds:
- surface: 80.0
construction: CONSTRUCTION:001
windows:
- surface: 1.5
azimuth: 180.0
tilt: wall
construction: INS2AR2020:001
width: 1.5
height: 1.0
- parameters:
floor_area: 120.0 # Larger room with different shape
average_room_height: 2.7
id: SPACE:002
external_boundaries:
external_walls:
- surface: 120.0
azimuth: 180.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 100.0
azimuth: 90.0
tilt: wall
construction: CONSTRUCTION:001
- surface: 220.0
azimuth: 0.0
tilt: wall
construction: CONSTRUCTION:001
floor_on_grounds:
- surface: 120.0
construction: CONSTRUCTION:001
windows:
- surface: 2.0
azimuth: 180.0
tilt: wall
construction: INS2AR2020:001
width: 2.0
height: 1.2
internal_walls:
- space_1: SPACE:002
space_2: SPACE:001
construction: CONSTRUCTION:001
surface: 18.0
Code
This code snippet demonstrates how to simulate a two-zone building using Trano, which is similar to simulating a one-zone building. The primary difference is in the structure of the configuration file. Additionally, the library name "buildings" is utilized here.
By default, Trano employs the Buildings library for simulation. In the next tutorial, we will explore how to use alternative libraries, including the IDEAS library.
from trano.main import simulate_model
from trano.simulate.simulate import SimulationLibraryOptions
simulate_model(
"./two_zones.yaml",
SimulationLibraryOptions(
start_time=0,
end_time=2 * 3600 * 24 * 7,
tolerance=1e-4,
library_name="Buildings",
),
)
Code Snippet Explanation
The code imports necessary functions and classes to simulate a model defined in a YAML file using specified simulation options.
General Description and Parameters
-
Function:
simulate_model -
Parameters:
-
YAML File Path:
"./two_zones.yaml"- Path to the model configuration file in YAML format.
-
SimulationLibraryOptions: An object containing simulation parameters.
- start_time:
0 -
Initial time for the simulation (in seconds).
-
end_time:
2 * 3600 * 24 * 7 -
Final time for the simulation, calculated as 2 weeks in seconds.
-
tolerance:
1e-4 -
Numerical tolerance for the simulation.
-
library_name:
"Buildings" - Specifies the library used for the simulation, in this case, assumed to be related to building modeling.
- start_time:
Outputs
The report below is generated by Trano after simulating the two-zone building.
Spaces
| hRoo | AFlo | linearizeRadiation | m_flow_nominal | mSenFac | T_start | volume |
|---|---|---|---|---|---|---|
| 2.5 | 80.0 | true | 0.01 | 1.0 | 294.15 | 200.0 |
| gain | k | occupancy | name |
|---|---|---|---|
| [40; 75; 40] | 1/7/3 | 3600*{9, 17} | occupancy_1 |
| Name | Azimuth | Construction Name | Surface | Tilt | ||
|---|---|---|---|---|---|---|
| externalwall_0 | 180.0 | construction_001 | 90.0 | wall | ||
| externalwall_1 | 90.0 | construction_001 | 70.0 | wall | ||
| externalwall_2 | 270.0 | construction_001 | 160.0 | wall | ||
| window_0 | 180.0 | ins2ar2020_001 | 1.5 | wall | ||
| flooronground_0 | 90.0 | construction_001 | 80.0 | floor | ||
| internal_space_002_space_001_construction | 10.0 | construction_001 | 18.0 | wall |
| hRoo | AFlo | linearizeRadiation | m_flow_nominal | mSenFac | T_start | volume |
|---|---|---|---|---|---|---|
| 2.7 | 120.0 | true | 0.01 | 1.0 | 294.15 | 324.0 |
| gain | k | occupancy | name |
|---|---|---|---|
| [40; 75; 40] | 1/7/3 | 3600*{9, 17} | occupancy_2 |
| Name | Azimuth | Construction Name | Surface | Tilt | ||
|---|---|---|---|---|---|---|
| externalwall_3 | 180.0 | construction_001 | 120.0 | wall | ||
| externalwall_4 | 90.0 | construction_001 | 100.0 | wall | ||
| externalwall_5 | 0.0 | construction_001 | 220.0 | wall | ||
| window_1 | 180.0 | ins2ar2020_001 | 2.0 | wall | ||
| flooronground_1 | 90.0 | construction_001 | 120.0 | floor | ||
| internal_space_002_space_001_construction | 10.0 | construction_001 | 18.0 | wall |
| Name | c | epsLw | epsSw | k | rho | Thickness |
|---|---|---|---|---|---|---|
| glass_001 | 860.0 | 0.82 | 0.65 | 1.1 | 2500.0 | 0.005 |
| air_001 | 1005.0 | 0.0 | 0.0 | 0.026 | 1.18 | 0.014 |
| glass_001 | 860.0 | 0.82 | 0.65 | 1.1 | 2500.0 | 0.005 |
| Name | c | epsLw | epsSw | k | rho | Thickness |
|---|---|---|---|---|---|---|
| material_001 | 900.0 | 0.85 | 0.85 | 0.045 | 2100.0 | 0.12 |
| material_002 | 950.0 | 0.85 | 0.85 | 0.04 | 1950.0 | 0.08 |
| material_003 | 920.0 | 0.85 | 0.85 | 0.038 | 2050.0 | 0.1 |